import { request,server,serverUpload } from '../utils/request.js'

export  function getPlugsInfoById(data){ 
	return server({
		url:'/api/plugs/getPlugsInfoById',
		method: 'GET',
		data
	})
}

export  function getCode(data){ 
	return request({
		url:'/api/oauth/getWeChartSmallProgramLoginInfo',
		method: 'GET',
		data
	})
}

export  function login(data){ 
	return request({
		url:'/api/admin/adminUserLogin',
		method: 'Get',
		data
	})
}
// 图片上传
export  function uploadImages(data){ 
	return serverUpload({
		url:'/api/file/uploadImages',
		method: 'POST',
		data
	})
}
export  function uploadFile(data){ 
	return serverUpload({
		url:'/api/file/uploadFile',
		method: 'POST',
		data
	})
}



// 获取个人信息
export  function searchUserInfoById(data){ 
	return request({
		url:'/api/user/searchUserInfoById',
		method: 'GET',
		data
	})
}

// 修改个人信息 /api/user/updateUserInfo
export  function updateUserInfo(data){ 
	return server({
		url:'/api/user/updateUserInfo',
		method: 'POST',
		data
	})
}




// api/admin/searchAdminUserById  获取管理员账号信息
export  function searchAdminUserById(data){ 
	return request({
		url:'/api/admin/searchAdminUserById',
		method: 'GET',
		data
	})
}

export  function updateAdminUser(data){ 
	return server({
		url:'/api/admin/updateAdminUser',
		method: 'POST',
		data
	})
}

// // 根据id查会员信息
// export  function searchUserInfoById(data){ 
// 	return request({
// 		url:'/api/user/searchUserInfoById',
// 		method: 'GET',
// 		data
// 	})
// }
// 修改会员信息
export  function adminUpdateUserInfo(data){ 
	return server({
		url:'/api/user/adminUpdateUserInfo',
		method: 'POST',
		data
	})
}



// 获取订单列表  /api/order/searchOrderItemList
export  function searchOrderList(data){ 
	return request({
		url:'/api/order/searchOrderList',
		method: 'GET',
		data
	})
}

// 按id查订单详情 /api/order/getOrderInfoById
export  function getOrderInfoById(data){ 
	return request({
		url:'/api/order/getOrderInfoById',
		method: 'GET',
		data
	})
}

// /api/order/verificationOrder   订单核销
export  function verificationOrder(data){ 
	return request({
		url:'/api/order/verificationOrder',
		method: 'POST',
		data
	})
}


// 删除订单

export  function delOrder(data){ 
	return request({
		url:'/api/order/delOrder',
		method: 'POST',
		data
	})
}

// /api/order/shopApplyOrderRefund  退款
export  function shopApplyOrderRefund(data){ 
	return request({
		url:'/api/order/shopApplyOrderRefund',
		method: 'POST',
		data
	})
}

// 支付 /api/pay/appletsWechatOrderPay
export  function appletsWechatOrderPay(data){ 
	return server({
		url:'/api/pay/appletsWechatOrderPay',
		method: 'POST',
		data
	})
}
// 取消订单 /api/order/cancelOrder
export  function cancelOrder(data){ 
	return request({
		url:'/api/order/cancelOrder',
		method: 'GET',
		data
	})
}


// api/plugs/searchPlugsGoodsList 获取商品列表

export  function searchPlugsGoodsList(data){ 
	return request({
		url:'/api/plugs/searchPlugsGoodsList',
		method: 'GET',
		data
	})
}
// 获取商品分类
export  function searchPlugsGoodCategoryList(data){ 
	return request({
		url:'/api/plugs/searchPlugsGoodCategoryList',
		method: 'GET',
		data
	})
}
// 添加分类
export  function addPlugsGoodCategory(data){ 
	return server({
		url:'/api/plugs/addPlugsGoodCategory',
		method: 'POST',
		data
	})
}
// 修改分类 updatePlugsGoodCategory
export  function updatePlugsGoodCategory(data){ 
	return server({
		url:'/api/plugs/updatePlugsGoodCategory',
		method: 'POST',
		data
	})
}
// 按id查分类 searchPlugsGoodCategoryById
export  function searchPlugsGoodCategoryById(data){ 
	return request({
		url:'/api/plugs/searchPlugsGoodCategoryById',
		method: 'GET',
		data
	})
}
//删除分类 delPlugsGoodCategory
export  function delPlugsGoodCategory(data){ 
	return request({
		url:'/api/plugs/delPlugsGoodCategory',
		method: 'POST',
		data
	})
}

// 获取店铺 
export  function getBusinessInfo(data){ 
	return request({
		url:'/api/plugs/getBusinessInfo',
		method: 'GET',
		data
	})
}
// 添加商品
export  function insertPlugsGoods(data){ 
	return server({
		url:'/api/plugs/insertPlugsGoods',
		method: 'POST',
		data
	})
}
// 修改商品 updatePlugsGoods
export  function updatePlugsGoods(data){ 
	return server({
		url:'/api/plugs/updatePlugsGoods',
		method: 'POST',
		data
	})
}
// 按id查商品 searchPlugsGoodsById
export  function searchPlugsGoodsById(data){ 
	return request({
		url:'/api/plugs/searchPlugsGoodsById',
		method: 'GET',
		data
	})
}
//删除商品 delPlugsGoods
export  function delPlugsGoods(data){ 
	return request({
		url:'/api/plugs/delPlugsGoods',
		method: 'POST',
		data
	})
}

// 店铺列表 searchPlugsDataList

export  function searchPlugsDataList(data){ 
	return request({
		url:'/api/plugs/searchPlugsDataList',
		method: 'GET',
		data
	})
}

// 查询门店 searchPlugsDataById
export  function searchPlugsDataById(data){ 
	return request({
		url:'/api/plugs/searchPlugsDataById',
		method: 'GET',
		data
	})
}
// 新增门店 insertPlugsData
export  function insertPlugsData(data){ 
	return server({
		url:'/api/plugs/insertPlugsData',
		method: 'POST',
		data
	})
}
// 修改门店 updatePlugsData
export  function updatePlugsData(data){ 
	return server({
		url:'/api/plugs/updatePlugsData',
		method: 'POST',
		data
	})
}


// 会员列表  api/user/searchUserInfoList

export  function searchUserInfoList(data){ 
	return request({
		url:'/api/user/searchUserInfoList',
		method: 'GET',
		data
	})
}

// searchPlugsCouponsList
export  function searchPlugsCouponsList(data){ 
	return request({
		url:'/api/plugs/searchPlugsCouponsList',
		method: 'GET',
		data
	})
}

// /api/plugs/insertPlugsGoodsAttributeKey  规格key
export  function insertPlugsGoodsAttributeKey(data){ 
	return server({
		url:'/api/plugs/insertPlugsGoodsAttributeKey',
		method: 'POST',
		data
	})
}
// /api/plugs/insertPlugsGoodsAttributeValue  规格value
export  function insertPlugsGoodsAttributeValue(data){ 
	return server({
		url:'/api/plugs/insertPlugsGoodsAttributeValue',
		method: 'POST',
		data
	})
}
// insertPlugsGoodsSpecification  规格列表
export  function insertPlugsGoodsSpecification(data){ 
	return server({
		url:'/api/plugs/insertPlugsGoodsSpecification',
		method: 'POST',
		data
	})
}

// /api/plugs/searchPlugsGoodsSpecificationByGoodsId  获取规格信息

export  function searchPlugsGoodsSpecificationByGoodsId(data){ 
	return server({
		url:'/api/plugs/searchPlugsGoodsSpecificationByGoodsId',
		method: 'GET',
		data
	})
}

// delPlugsGoodsSpecificationAll

export  function delPlugsGoodsSpecificationAll(data){ 
	return request({
		url:'/api/plugs/delPlugsGoodsSpecificationAll',
		method: 'POST',
		data
	})
}

// /api/order/orderSendGoods  发货

export  function orderSendGoods(data){ 
	return request({
		url:'/api/order/orderSendGoods',
		method: 'POST',
		data
	})
}

// /api/logistics/updateOrderLogistics  修改物流信息

export  function updateOrderLogistics(data){ 
	return server({
		url:'/api/logistics/updateOrderLogistics',
		method: 'POST',
		data
	})
}

// api/file/getFileByGroupTitle   获取附件分类
export  function getFileByGroupTitle(data){ 
	return server({
		url:'/api/file/getFileByGroupTitle',
		method: 'GET',
		data
	})
}

// searchPlugsByGroup  获取附件列表
export  function searchPlugsByGroup(data){ 
	return request({
		url:'/api/file/searchPlugsByGroup',
		method: 'GET',
		data
	})
}
// api/file/delPlugsFile 
export  function delPlugsFile(data){ 
	return request({
		url:'/api/file/delPlugsFile',
		method: 'POST',
		data
	})
}

// 商品是否推荐  setGoodsRecommend
export  function setGoodsRecommend(data){ 
	return request({
		url:'/api/plugs/setGoodsRecommend',
		method: 'GET',
		data
	})
}
// /api/plugs/searchPlugsFormList 获取表单列表
export  function searchPlugsFormList(data){ 
	return request({
		url:'/api/plugs/searchPlugsFormList',
		method: 'GET',
		data
	})
}
// /api/plugs/searchPlugsFormById 获取表单详情
export  function searchPlugsFormById(data){ 
	return request({
		url:'/api/plugs/searchPlugsFormById',
		method: 'GET',
		data
	})
}
export  function searchPlugsFormDataList(data){ 
	return request({
		url:'/api/plugs/searchPlugsFormDataList',
		method: 'GET',
		data
	})
}
// 店铺审核列表 searchPlugsAuditList
export  function searchPlugsAuditList(data){ 
	return request({
		url:'/api/plugs/searchPlugsAuditList',
		method: 'GET',
		data
	})
}
//店铺审核修改  updateAudit
export  function updateAudit(data){ 
	return server({
		url:'/api/plugs/updateAudit',
		method: 'POST',
		data
	})
}
//店铺审核修改  plugsAudit
export  function plugsAudit(data){ 
	return server({
		url:'/api/plugs/plugsAudit',
		method: 'POST',
		data
	})
}

// api/file/createFileGroup?groupName

export  function createFileGroup(data){ 
	return request({
		url:'/api/file/createFileGroup',
		method: 'GET',
		data
	})
}


export  function updateFileGroupById(data){ 
	return server({
		url:'/api/file/updateFileGroupById',
		method: 'POST',
		data
	})
}
export  function deleteFileGroup(data){ 
	return request({
		url:'/api/file/deleteFileGroup',
		method: 'GET',
		data
	})
}

// //api/logistics/synchronousWeChartOrderLogisticsStatus  同步小程序发货

export  function synchronousWeChartOrderLogisticsStatus(data){ 
	return request({
		url:'/api/logistics/synchronousWeChartOrderLogisticsStatus',
		method: 'POST',
		data
	})
}

// /api/logistics/followWaybill
export  function followWaybill(data){ 
	return request({
		url:'/api/logistics/followWaybill',
		method: 'POST',
		data
	})
}

// /api/pay/searchPayRecordList
export  function searchPayRecordList(data){ 
	return request({
		url:'/api/pay/searchPayRecordList',
		method: 'GET',
		data
	})
}

// 获取appid  /api/plugs/getUserAuthorizeApplet
export  function getUserAuthorizeApplet(data){ 
	return request({
		url:'/api/plugs/getUserAuthorizeApplet',
		method: 'GET',
		data
	})
}

// 获取模板信息 /api/platform/getUserTemplateConf
export  function getUserTemplateConf(data){ 
	return request({
		url:'/api/platform/getUserTemplateConf',
		method: 'GET',
		data
	})
}

// 获取类目  /api/plugs/getAppletOkSetCategoryName

export  function getAppletOkSetCategoryName(data){ 
	return request({
		url:'/api/plugs/getAppletOkSetCategoryName',
		method: 'GET',
		data
	})
}
// 获取模板库列表
export  function getTemplateList(data){ 
	return request({
		url:'/api/plugs/getTemplateList',
		method: 'GET',
		data
	})
}

// 获取线上版本
export  function getAppletVersionInfo(data){ 
	return request({
		url:'/api/plugs/getAppletVersionInfo',
		method: 'POST',
		data
	})
}
// 获取审核体验版本
export  function getLatestAuditStatus(data){ 
	return request({
		url:'/api/plugs/getLatestAuditStatus',
		method: 'POST',
		data
	})
}

// submitAudit  提交审核
export  function submitAudit(data){ 
	return server({
		url:'/api/plugs/submitAudit',
		method: 'POST',
		data
	})
}

// releaseProgram  发布代码

export  function releaseProgram(data){ 
	return request({
		url:'/api/plugs/releaseProgram',
		method: 'POST',
		data
	})
}

// undoAudit  撤回审核


export  function undoAudit(data){ 
	return request({
		url:'/api/plugs/undoAudit',
		method: 'POST',
		data
	})
}

// commitProgramCode  选择最新版
export  function commitProgramCode(data){ 
	return server({
		url:'/api/plugs/commitProgramCode',
		method: 'POST',
		data
	})
}

// 模板续费
export  function templatePay(data){ 
	return request({
		url:'/api/pay/templatePay',
		method: 'GET',
		data
	})
}
